Field of the Invention
This invention relates generally to the field of computer processors. More particularly, the invention relates to an optimized depth buffer cache apparatus and method.
Description of the Related Art
Current graphics processors perform depth buffering (sometimes referred to as z-buffering) for managing image depth coordinates in three-dimensional (3-D) graphics. When an object is rendered, the depth of a generated pixel (z coordinate) is stored in the z/depth-buffer which is generally arranged as a two-dimensional array with one element associated with each screen pixel. If another object of the scene is to be rendered in the same pixel, the method compares the two depths and uses the one which is closer to the observer (overriding the other). The chosen depth may then be saved to the z-buffer, replacing the old one.
Current depth caches must utilize techniques for dealing with read after write (RAW) hazards. Existing solutions, for example, may stall the reads to the cache line until all pending writes are complete. This may have a significant performance impact, however, given that in some modes of operation the point where the writes are completed is many clocks behind the read requests. This represents a major bottleneck in the Z pipeline.